// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "GameSettingValueDiscrete.h"

#include "LyraSettingValueDiscrete_OverallQuality.generated.h"

class UObject;

/**
 * 整体质量离散值设置类，继承自UGameSettingValueDiscrete
 */
UCLASS()
class ULyraSettingValueDiscrete_OverallQuality : public UGameSettingValueDiscrete
{
	GENERATED_BODY()
	
public:

	ULyraSettingValueDiscrete_OverallQuality();

	/** UGameSettingValue */
	/**
	 * 存储初始设置
	 */
	virtual void StoreInitial() override;
	/**
	 * 重置为默认值
	 */
	virtual void ResetToDefault() override;
	/**
	 * 恢复到初始值
	 */
	virtual void RestoreToInitial() override;

	/** UGameSettingValueDiscrete */
	/**
	 * 根据索引设置离散选项
	 */
	virtual void SetDiscreteOptionByIndex(int32 Index) override;
	/**
	 * 获取离散选项索引
	 */
	virtual int32 GetDiscreteOptionIndex() const override;
	/**
	 * 获取离散选项
	 */
	virtual TArray<FText> GetDiscreteOptions() const override;

protected:
	/** UGameSettingValue */
	/**
	 * 初始化时调用
	 */
	virtual void OnInitialized() override;
	
	/**
	 * 获取自定义选项索引
	 */
	int32 GetCustomOptionIndex() const;
	/**
	 * 获取整体质量级别
	 */
	int32 GetOverallQualityLevel() const;

	TArray<FText> Options; // 选项数组
	TArray<FText> OptionsWithCustom; // 包含自定义的选项数组

};